Properly handle autogenerated *config.ml files in builddir
authorHilko Bengen <bengen@debian.org>
Mon, 23 Dec 2019 11:46:43 +0000 (12:46 +0100)
committerHilko Bengen <bengen@debian.org>
Fri, 30 Jan 2026 16:45:11 +0000 (17:45 +0100)
Gbp-Pq: Name Properly-handle-autogenerated-config.ml-files-in-builddir.patch

common/mlstdutils/Makefile.am
daemon/Makefile.am
ocaml-dep.sh.in
subdir-rules.mk

index b9632b0780c46138031752e0d402d94f34781c25..a05f97ea62713cb0a6c5a09c69625df96ddabd18 100644 (file)
@@ -130,7 +130,7 @@ check-valgrind:
        $(MAKE) VG="@VG@" check
 
 # OCaml dependencies.
-.depend: $(srcdir)/*.mli $(srcdir)/*.ml
+.depend: $(srcdir)/*.mli $(srcdir)/*.ml $(builddir)/guestfs_config.ml
        $(top_builddir)/ocaml-dep.sh $^
 -include .depend
 
index a10cf83d918dd63c1d8a357bdbf25d9cc6bc39bc..a602248be9c82841ee282673a43ed6cf1ecd0e13 100644 (file)
@@ -400,7 +400,7 @@ camldaemon.o: $(OBJECTS)
            $(OBJECTS)
 
 # OCaml dependencies.
-.depend: $(srcdir)/*.mli $(srcdir)/*.ml
+.depend: $(srcdir)/*.mli $(srcdir)/*.ml $(builddir)/daemon_config.ml
        $(top_builddir)/ocaml-dep.sh $^
 -include .depend
 
index 8cdfd76ba83934e9402601118f4e530b9fbd47bf..4283c528c97813339ac797e770af0404c1075ae4 100755 (executable)
@@ -67,7 +67,7 @@ echo >> $output-t
     | sed \
           -e "s,@abs_top_srcdir@/${subdir},.,g" \
           -e "s,\B${srcdir_re}/\\([^ ]*[.]\\)\\(cm[^ ]*\\|o\\),\\1\\2,g" \
-          -e "s,\B${srcdir_re}/\\([^ /]*_config[.]ml\\),\\1,g" \
+          -e "s,\B${srcdir_re}/\\([^ /]*config[.]ml\\),\\1,g" \
           -e "s,@abs_top_srcdir@/\\([^ ]*[.]\\)\\(cm[^ ]*\\|o\\),${top_builddir}/\\1\\2,g" \
           -e 's,\(^\| \)./,\1,g' \
     >> $output-t
index 0288308c42c063fd61aa266f967093df84d18e32..29ba8f74cb14793bb4f906960b1dbf0dc2bedb9e 100644 (file)
@@ -86,7 +86,11 @@ guestfs_am_v_po4a_translate_0 = @echo "  PO4A-T  " $@;
        $(guestfs_am_v_ocamlcmi)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 %.cmo: %.ml
        $(guestfs_am_v_ocamlc)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
+%.cmo: $(builddir)/%.ml
+       $(guestfs_am_v_ocamlc)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 if HAVE_OCAMLOPT
 %.cmx: %.ml
        $(guestfs_am_v_ocamlopt)$(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
+%.cmx: $(builddir)/%.ml
+       $(guestfs_am_v_ocamlopt)$(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 endif